﻿<!--***********************************************************************************

   Extended WPF Toolkit

   Copyright (C) 2007-2013 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license 

   For more features, controls, and fast professional support,
   pick up the Plus Edition at http://xceed.com/wpf_toolkit

   Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

  **********************************************************************************-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Xceed.Wpf.DataGrid"
                    xmlns:markup="clr-namespace:Xceed.Wpf.DataGrid.Markup"
                    xmlns:views="clr-namespace:Xceed.Wpf.DataGrid.Views">

   <ResourceDictionary.MergedDictionaries>
      <!-- Style definitions for specific controls (things that are not grid elements) -->

      <markup:DataGridThemeResourceDictionary Source="/themes/Controls/FixedColumnSplitter.generic.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Controls/TableViewScrollViewer.generic.xaml" />

      <!-- For each specific systeme theme ResourceDictionary, we only need to include 
           the xaml associated to the theme (to make the "BasedOn" work). However, here 
           we have include all xaml theme files of the product to make the forcing of a 
           theme work. And it works because, when the DefaultStyleKey is not found in the 
           specific ResourceDictionary, WPF looks in the generic.xaml ResourceDictionary. 
           That way, we don't have to maintain this list in all the xaml files. -->

      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableflowView.Luna.homestead.xaml" />
      <markup:DataGridThemeResourceDictionary Source="/themes/Luna/TableView.Luna.homestead.xaml" />

   </ResourceDictionary.MergedDictionaries>

   <!-- Generic theme for TableView -->

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView}"
          TargetType="views:TableView"
          BasedOn="{StaticResource tableViewLunaHomesteadDefaultValues}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DataGridControl}"
          TargetType="local:DataGridControl"
          BasedOn="{StaticResource tableViewLunaHomesteadGridControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:RowSelectorPane}"
          TargetType="local:RowSelectorPane"
          BasedOn="{StaticResource tableViewLunaHomesteadRowSelectorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:RowSelector}"
          TargetType="local:RowSelector"
          BasedOn="{StaticResource tableViewLunaHomesteadRowSelectorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:Row}"
          TargetType="local:Row"
          BasedOn="{StaticResource tableViewLunaHomesteadRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DataRow}"
          TargetType="local:DataRow"
          BasedOn="{StaticResource tableViewLunaHomesteadDataRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:ColumnManagerRow}"
          TargetType="local:ColumnManagerRow"
          BasedOn="{StaticResource tableViewLunaHomesteadColumnManagerRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:Cell}"
          TargetType="local:Cell"
          BasedOn="{StaticResource tableViewLunaHomesteadCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DataCell}"
          TargetType="local:DataCell"
          BasedOn="{StaticResource tableViewLunaHomesteadDataCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:ColumnManagerCell}"
          TargetType="local:ColumnManagerCell"
          BasedOn="{StaticResource tableViewLunaHomesteadColumnManagerCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupByControl}"
          TargetType="local:GroupByControl"
          BasedOn="{StaticResource tableViewLunaHomesteadGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupByItem}"
          TargetType="local:GroupByItem"
          BasedOn="{StaticResource tableViewLunaHomesteadGroupByItemStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupHeaderControl}"
          TargetType="local:GroupHeaderControl"
          BasedOn="{StaticResource tableViewLunaHomesteadGroupHeaderControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupLevelIndicator}"
          TargetType="local:GroupLevelIndicator"
          BasedOn="{StaticResource tableViewLunaHomesteadGroupLevelIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:DetailIndicator}"
          TargetType="local:DetailIndicator"
          BasedOn="{StaticResource tableViewLunaHomesteadDetailIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:GroupLevelIndicatorPane}"
          TargetType="local:GroupLevelIndicatorPane"
          BasedOn="{StaticResource tableViewLunaHomesteadGroupLevelIndicatorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:ScrollTip}"
          TargetType="local:ScrollTip"
          BasedOn="{StaticResource tableViewLunaHomesteadScrollTipStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupByControlNode}"
          TargetType="local:HierarchicalGroupByControlNode"
          BasedOn="{StaticResource tableViewLunaHomesteadHierarchicalGroupByControlNodeStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupByControl}"
          TargetType="local:HierarchicalGroupByControl"
          BasedOn="{StaticResource tableViewLunaHomesteadHierarchicalGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableView, TargetElementType=local:HierarchicalGroupByItem}"
          TargetType="local:HierarchicalGroupByItem"
          BasedOn="{StaticResource tableViewLunaHomesteadHierarchicalGroupByItemStyle}" />

   <!-- Generic theme for TableflowView -->

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView}"
          TargetType="views:TableflowView"
          BasedOn="{StaticResource tableflowViewLunaHomesteadDefaultValues}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DataGridControl}"
          TargetType="local:DataGridControl"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGridControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:RowSelectorPane}"
          TargetType="local:RowSelectorPane"
          BasedOn="{StaticResource tableflowViewLunaHomesteadRowSelectorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:RowSelector}"
          TargetType="local:RowSelector"
          BasedOn="{StaticResource tableflowViewLunaHomesteadRowSelectorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:Row}"
          TargetType="local:Row"
          BasedOn="{StaticResource tableflowViewLunaHomesteadRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DataRow}"
          TargetType="local:DataRow"
          BasedOn="{StaticResource tableflowViewLunaHomesteadDataRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:ColumnManagerRow}"
          TargetType="local:ColumnManagerRow"
          BasedOn="{StaticResource tableflowViewLunaHomesteadColumnManagerRowStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:Cell}"
          TargetType="local:Cell"
          BasedOn="{StaticResource tableflowViewLunaHomesteadCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DataCell}"
          TargetType="local:DataCell"
          BasedOn="{StaticResource tableflowViewLunaHomesteadDataCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:ColumnManagerCell}"
          TargetType="local:ColumnManagerCell"
          BasedOn="{StaticResource tableflowViewLunaHomesteadColumnManagerCellStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupByControl}"
          TargetType="local:GroupByControl"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupByItem}"
          TargetType="local:GroupByItem"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupByItemStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupHeaderControl}"
          TargetType="local:GroupHeaderControl"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupHeaderControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupLevelIndicator}"
          TargetType="local:GroupLevelIndicator"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupLevelIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:DetailIndicator}"
          TargetType="local:DetailIndicator"
          BasedOn="{StaticResource tableflowViewLunaHomesteadDetailIndicatorStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupLevelIndicatorPane}"
          TargetType="local:GroupLevelIndicatorPane"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupLevelIndicatorPaneStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:ScrollTip}"
          TargetType="local:ScrollTip"
          BasedOn="{StaticResource tableflowViewLunaHomesteadScrollTipStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupByControlNode}"
          TargetType="local:HierarchicalGroupByControlNode"
          BasedOn="{StaticResource tableflowViewLunaHomesteadHierarchicalGroupByControlNodeStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupByControl}"
          TargetType="local:HierarchicalGroupByControl"
          BasedOn="{StaticResource tableflowViewLunaHomesteadHierarchicalGroupByControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:HierarchicalGroupByItem}"
          TargetType="local:HierarchicalGroupByItem"
          BasedOn="{StaticResource tableflowViewLunaHomesteadHierarchicalGroupByItemStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupNavigationButton}"
          TargetType="{x:Type local:GroupNavigationButton}"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupNavigationButtonStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupNavigationControl}"
          TargetType="{x:Type local:GroupNavigationControl}"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupNavigationControlStyle}" />

   <Style x:Key="{markup:ThemeKey TargetViewType=views:TableflowView, TargetElementType=local:GroupNavigationControlItem}"
          TargetType="{x:Type local:GroupNavigationControlItem}"
          BasedOn="{StaticResource tableflowViewLunaHomesteadGroupNavigationControlItemStyle}" />

</ResourceDictionary>
